<template>
  <div id="app" class="no-drag">
    <keep-alive :include="['Goodlist']">
      <router-view @touchmove="handleGlobalTouch" @mousemove="handleGlobalMouse" />
    </keep-alive>
  </div>
</template>

<script>
export default {
  methods: {
    methods: {
      handleGlobalTouch(e) {
        e.preventDefault(); // 直接阻止所有触摸移动的默认行为（拖拽、滚动等）
      }
      handleGlobalTouch(e) {
        if (e.target.closest('.no-drag')) {
          e.preventDefault()
        }
      },
      handleGlobalMouse(e) {
        if (e.target.closest('.no-drag')) {
          e.preventDefault()
        }
      }
    }
  }
</script>

<style>
body {
  touch-action: pan-y;
}

.no-drag {
  touch-action: none;
}
</style>
<style lang="scss">
@import './assets/scss/variables.scss';
</style>
